package com.navi.controller;

import com.navi.job.HmsLoaderService;
import com.navi.service.JdbcLoaderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

/**
 * Created by lin.xin on 2017/11/13.
 */

@RestController
public class DealErrorController {

//    @Autowired
//    private HmsLoaderService hmsLoaderService;

    @Autowired
    private JdbcLoaderService jdbcLoaderService;

    @RequestMapping(value = "/dealErrorQueue.do")
    public boolean dealErrorQueue(String queueName, int limit) throws IOException, TimeoutException {
        jdbcLoaderService.subMainProc(queueName);
        return true;
    }
}
